<?php
/**
 * 常量
 */
$x=5;
$y=6;
$z=$x+$y;
echo $z;
//创建数组
$student = array("张三","李四","王五");
echo var_dump($student); //返回变量的类型的值
//null 也是变量类型
$x = "hello";
print ("<br>"+var_dump($x));
$x = null;
print (var_dump($x));
//定义常量
// 区分大小写的常量名
define("GREETING", "欢迎访问 Runoob.com");
echo GREETING;    // 输出 "欢迎访问 Runoob.com"
echo '<br>';
echo greeting;   // 输出 "greeting"
//字符串拼接
$txt1="Hello world!";
$txt2="What a nice day!";
echo $txt1 . " " . $txt2;
//关联数组 类似java的map集合
echo "<br>";
$phone = array("三星"=>100,"iphone"=>200,"华为"=>300);
foreach ($phone as $p => $p_value){
    echo ("手机品牌:".$p."--"."价格:".$p_value);
    echo "<br>";
}
?>